import request from '@/utils/request'

/**
 * 文章管理
 * -----------------------------------------------------------------------------------------------------------
 */

/**
 * 查询文章列表
 * @param {*} params 
 }
 */
 export const getArticleList = (params) => {
    return request({
      url: '/wx/AppletArticle/list', 
      method: 'get',
      params,
    })
}

/**
 * 添加文章
 * @param {*} params 
 }
 */
 export const creatArticleList = (data) => {
  return request({
    url: '/wx/AppletArticle/add', 
    method: 'post',
    data,
  })
}

/**
 * 编辑文章
 * @param {*} params 
 }
 */
 export const editArticleList = (data) => {
  return request({
    url: '/wx/AppletArticle/edit', 
    method: 'post',
    data,
  })
}

/**
 * 删除文章
 * @param {*} params 
 }
 */
 export const deleteArticleList = (params) => {
  return request({
    url: '/wx/AppletArticle/remove', 
    method: 'get',
    params,
  })
}

/**
 * 查询文章详情
 * @param {*} params 
 }
 */
 export const getArticleDetail = (params) => {
  return request({
    url: '/wx/AppletArticle/getInfo', 
    method: 'get',
    params,
  })
}

/**
 * 消息管理
 * -------------------------------------------------------------------------------------------------------
 */

/**
 * 查询消息列表
 * @param {*} params 
 }
 */
 export const getMessageList = (params) => {
  return request({
    url: '/wx/appletNews/list', 
    method: 'get',
    params,
  })
}
/**
 * 添加消息
 */
export const creatMessage = (data) => {
  return request({
    url:'/wx/appletNews/add',
    method:'post',
    data
  })
}
/**
 * 编辑消息
 */
export const editMessage = (data) => {
  return request({
    url:'/wx/appletNews/edit',
    method:'post',
    data
  })
}
/**
 * 删除消息
 */
export const deleteMessage = (params) => {
  return request({
    url:'/wx/appletNews/remove',
    method:'get',
    params
  })
}
/**
 * 投诉建议
 * -------------------------------------------------------------------------------
 */
/**
 * 投诉建议列表
 */
export const getFeedback = (params) => {
  return request({
    url:'/wx/appletFeedback/list',
    method:'get',
    params
  })
}
/**
 * 小程序用户管理
 * ----------------------------------------------------------------------------------------
 */

/**
 * 小程序用户信息列表
 */
export const getUserList = (params) => {
  return request({
    url:'/wx/appletClient/list',
    method:'get',
    params
  })
}

/**
 * 小程序用户信息查询
 */
export const getUserInfo = (params) => {
  return request({
    url:'/wx/appletClientdata/getInfo',
    method:'get',
    params
  })
}

/**
 * 小程序用户 - 修改
 */
export const editUserInfo = (data) => {
  return request({
    url:'/wx/appletClientdata/edit',
    method:'post',
    data
  })
}

/**
 * 小程序用户日志记录 - 列表
 */
export const getFootprint = (params) => {
  return request({
    url:'/wx/appletUserLog/list',
    method:'get',
    params
  })
}

/**
 * 小程序用户 - 打标签
 */
export const addtags = (data) => {
  return request({
    url:'/wx/appletTag/makeLabel',
    method:'post',
    data
  })
}

/**
 * 小程序用户 - 移除标签
 */
export const deletetags = (data) => {
  return request({
    url:'/wx/appletTag/removeLabel',
    method:'post',
    data
  })
}

/**
 * 园区管理
 * ----------------------------------------------------------------------------------------
 */

/**
 * 园区申请入驻信息 - 列表
 */
export const getApplyEntrant = (params) => {
  return request({
    url:'/wx/appletMessage/list',
    method:'get',
    params
  })
}

/**
 * 园区申请入驻信息 - 修改
 */
 export const updateApplyEntrant = (data) => {
  return request({
    url:'/wx/appletMessage/update',
    method:'post',
    data
  })
}

/**
 * 园区 - 列表
 */
export const getParkList = (params) => {
  return request({
    url:'/wx/appletHome/list',
    method:'get',
    params
  })
}

/**
 * 园区 - 详情
 */
export const getParkDetail = (params) => {
  return request({
    url:'/wx/appletHome/infoSurface',
    method:'get',
    params
  })
}

/**
 * 园区 - 详情 - 小程序/后台
 */
export const getParkDetailMini = (params) => {
  return request({
    url:'/wx/appletHome/info',
    method:'get',
    params
  })
}

/**
 * 园区 - 添加
 */
 export const creatPark = (data) => {
  return request({
    url:'/wx/appletHome/add',
    method:'post',
    data
  })
}

/**
 * 园区 - 编辑
 */
 export const editPark = (data) => {
  return request({
    url:'/wx/appletHome/edit',
    method:'post',
    data
  })
}

/**
 * 园区 - 删除
 */
export const deletePark = (params) => {
  return request({
    url:'/wx/appletHome/remove',
    method:'get',
    params
  })
}

/**
 * 查询 - 园区 - 小程序首页推荐
 */
 export const getRecommendHomeParkList = (params) => {
  return request({
    url:'/wx/appletRecommend/listRecommend',
    method:'get',
    params
  })
}

/**
 * 新增 - 园区 - 小程序首页推荐
 */
 export const addRecommendHomePark = (data) => {
  return request({
    url:'/wx/appletRecommend/add',
    method:'post',
    data
  })
}

/**
 * 修改 - 园区 - 小程序首页推荐
 */
 export const updateRecommendHomePark = (data) => {
  return request({
    url:'/wx/appletRecommend/edit',
    method:'post',
    data
  })
}

/**
 * 删除 - 园区 - 小程序首页推荐
 */
 export const deleteRecommendHomePark = (params) => {
  return request({
    url:'/wx/appletRecommend/remove',
    method:'get',
    params
  })
}

/**
 * 查询 - 企业列表（申请）
 */
export const getCompanyList = (params) => {
  return request({
    url:'/wx/appletClaim/list',
    method:'get',
    params
  })
}

/**
 * 修改 - 企业申请状态
 */
export const updateCompanyStatus = (params) => {
  return request({
    url:'/wx/appletClaim/audit',
    method:'get',
    params
  })
}

/**
 * 查询 - 企业信息修改列表
 */
export const getCompanyEditList = (params) => {
  return request({
    url:'/wx/appletCorporateHome/listCheck',
    method:'get',
    params
  })
}

/**
 * 查询 - 企业信息修改详情
 */
export const getCompanyEditInfo = (params) => {
  return request({
    url:'/wx/appletCorporateHome/infoCheck',
    method:'get',
    params
  })
}

/**
 * 修改 - 企业信息修改 - 审核状态
 */
export const updateCompanyEditStatus = (params) => {
  return request({
    url:'/wx/appletCorporateHome/editCheck',
    method:'get',
    params
  })
}

/**
 * 查询 - 园区信息修改 - 列表
 */
export const getParkInfoEditList = (params) => {
  return request({
    url:'/wx/appletHome/listCheck',
    method:'get',
    params
  })
}

/**
 * 修改 - 园区信息审核
 */
export const updateParkExamined = (params) => {
  return request({
    url:'/wx/appletHome/editCheck',
    method:'get',
    params
  })
}

/**
 * 企查查
 * --------------------------------------------------------------------------
 */

/**
 * 查询 - 企业列表（企查查）
 */
export const getQccCompanyList = (params) => {
  return request({
    url:'/wx/appletCompanyData/list',
    method:'get',
    params
  })
}

/**
 * 添加 - 企业信息
 */
 export const creatQccCompany = (data) => {
  return request({
    url:'/wx/appletCompanyData/add',
    method:'post',
    data
  })
}

/**
 * 修改 - 企业信息
 */
 export const updateQccCompany = (data) => {
  return request({
    url:'/wx/appletCompanyData/edit',
    method:'post',
    data
  })
}


/**
 * 房源面积管理
 * -------------------------------------------------------------------------
 */

/**
 * 房源面积管理 - 列表
 */
 export const getParkAreaList = (params) => {
  return request({
    url:'/wx/appletArea/list',
    method:'get',
    params
  })
}

/**
 * 房源面积管理 - 添加
 */
 export const creatParkArea = (data) => {
  return request({
    url:'/wx/appletArea/add',
    method:'post',
    data
  })
}

/**
 * 房源面积管理 - 编辑
 */
 export const updateParkArea = (data) => {
  return request({
    url:'/wx/appletArea/edit',
    method:'post',
    data
  })
}

/**
 * 房源面积管理 - 删除
 */
 export const deleteParkArea = (params) => {
  return request({
    url:'/wx/appletArea/remove',
    method:'get',
    params
  })
}

/**
 * 招商房源管理
 * ----------------------------------------------------------------------------------------
 */

//查询 - 园区招商房源列表
export const getHouseList = (params) => {
  return request({
    url:'/wx/appletHousing/areaIdList',
    method:'get',
    params
  })
}

//新增 - 园区招商房源
export const creatHouse= (data) => {
  return request({
    url:'/wx/appletHousing/add',
    method:'post',
    data
  })
}

//修改 - 园区招商房源
export const updateHouse= (data) => {
  return request({
    url:'/wx/appletHousing/edit',
    method:'post',
    data
  })
}

//删除 - 园区招商房源列表
export const deleteHouse = (params) => {
  return request({
    url:'/wx/appletHousing/remove',
    method:'get',
    params
  })
}

//详情 - 园区招商房源列表
export const getHouseInfo = (params) => {
  return request({
    url:'/wx/appletHousing/getInfoById',
    method:'get',
    params
  })
}

//查询 - 房源审核列表
export const getParkHouseExaminedList = (params) => {
  return request({
    url:'/wx/appletHousing/checkList',
    method:'get',
    params
  })
}

//修改 - 房源审核状态
export const updateParkHouseExaminedStatus = (params) => {
  return request({
    url:'/wx/appletHousing/editApplet',
    method:'get',
    params
  })
}

/**
 * 名片
 * -------------------------------------------------------------------------------
 */

//查询 - 名片审核列表
export const getCardExaminedList = (params) => {
  return request({
    url:'/wx/appletCard/checkList',
    method:'get',
    params
  })
}

//查询 - 名片审核详情
export const getCardExaminedInfo = (params) => {
  return request({
    url:'/wx/appletCard/getInfo',
    method:'get',
    params
  })
}

//修改 - 名片审核状态
export const updateCardExaminedInfoStatus = (params) => {
  return request({
    url:'/wx/appletCard/editCheck',
    method:'get',
    params
  })
}

/**
 * 营销工具
 * ---------------------------------------------
 */
//添加 - 朋友圈文案
export const creatWechatZoneText = (data) => {
  return request({
    url:'/wx/appletMoments/add',
    method:'post',
    data
  })
}

//查询 - 朋友圈文案
export const getWechatZoneText = (params) => {
  return request({
    url:'/wx/appletMoments/list',
    method:'get',
    params
  })
}

//修改 - 朋友圈文案
export const updateWechatZoneText = (data) => {
  return request({
    url:'/wx/appletMoments/edit',
    method:'post',
    data
  })
}

//删除 - 朋友圈文案
export const deleteWechatZoneText = (data) => {
  return request({
    url:'/wx/appletMoments/' + data.id,
    method:'post'
  })
}

//查询 - 看房工单
export const getAppletWorkOrderList = (params) => request.get('/wx/appletWorkOrder/list', { params })

// 修改 - 看房工单
export const postAppletWorkOrderEdit = (params) => request.post('/wx/appletWorkOrder/edit', params)

// 发放佣金
export const postAppletWorkOrderComPayment = (params) => request.get('/wx/appletWorkOrder/ComPayment', {params})

// 查询 - 分佣规则
export const getAppletRulesList = (params) => request.get('/wx/appletRules/list', {params})

// 新增 - 分佣规则
export const getAppletRulesAdd = (params) => request.post('/wx/appletRules/add', params)

// 修改 - 分佣规则
export const getAppletRulesEdit = (params) => request.post('/wx/appletRules/edit', params)

// 启用-停用 - 分佣规则
export const getAppletRulesEditSign = (params) => request.get('/wx/appletRules/editSign', {params})
